package com.zengfa.task.server.domain.entity;

import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zengfa.task.api.enums.JobStatus;
import com.zengfa.task.api.enums.RunType;

import lombok.Data;

@Data
public class JobNode {

    private String id;
    
    private String jobId;
    
    private Integer nodeOrder;
    
    private String nodeCode;
    
    private String nodeName;
    
    private Integer runType;
    
    /**
	 * 执行ip
	 */
    private String execIp;
    
    /**
	 * 剩余重试次数
	private Integer tryCountLeft;
     */
	
	/**
	 * 重试策略，1自动重试
	private Integer tryCountStrategy;
	 */
    
    private JobStatus status;
    
    private String message;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime startTime;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime endTime;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime insertTime;
	
	private String insertBy;
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	private LocalDateTime updateTime;
	
	private String updateBy;

	public JobNode() {
		super();
	}
	
	public JobNode(String nodeCode, String nodeName) {
		super();
		this.nodeCode = nodeCode;
		this.nodeName = nodeName;
	}
	
}
